package com.laicunba.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.laicunba.constant.AttributeConstant;
import com.laicunba.constant.StatusConstant;
import com.laicunba.service.RegistryService;
import com.laicunba.service.StatusService;

@Service
public class StatusServiceImpl implements StatusService {
	@Autowired
	private RegistryService registryService;
	
	@Override
	public boolean isOpendUsrTransfer() {
		return StatusConstant.isOpendUsrTransfer(registryService.getFromCache(AttributeConstant.TRANSFER_STATUS_KEY));
	}

	@Override
	public boolean notUsrServiceTime() {
		return !isOpendUsrTransfer();
	}

}
